function fetchData(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            resolve("数据已经加载好了")
        },5000)
    })
}
async function loadData(){
    try{
        let data = fetchData();
        console.log('等待中')
        console.log(data)
    }catch(error){
        console.log('加载时出错')
    }
}
loadData()
